<template>

    <el-container class="container">
        <el-header>Header</el-header>

        <el-container>
            <el-aside width="200px">

                <!-- 左侧导航 --><!-- default-active="/management/guanli" 默认加载页路由路径 --><!--  :router="true"  开启导航 -->
                <el-row class="tac">
                    <el-col :span="24">
                        <el-menu default-active="/management/guanli" class="el-menu-vertical-demo" :router="true"
                            @open="handleOpen" @close="handleClose">
                            <el-sub-menu index="1">
                                <template #title>
                                    <el-icon>
                                        <Location />
                                    </el-icon>
                                    <span>Navigator One</span>
                                </template>
                                <el-sub-menu index="1-1">
                                    <template #title>item four</template>
                                    <el-menu-item index="/management/xinxi">信息</el-menu-item>
                                </el-sub-menu>
                            </el-sub-menu>
                            <el-menu-item index="/management/guanli">
                                <el-icon><icon-menu /></el-icon>
                                <span>管理</span>
                            </el-menu-item>
                            <el-menu-item index="/management/xiangqing">
                                <el-icon>
                                    <setting />
                                </el-icon>
                                <span>详情</span>
                            </el-menu-item>
                        </el-menu>
                    </el-col>

                </el-row>
                <!-- 左侧导航 -->


            </el-aside>
            <el-main>
                <router-view /><!-- 路由出口 -->
            </el-main>
        </el-container>

        <el-footer>Footer</el-footer>
    </el-container>
</template>

<script setup>
import {
    Location,
} from '@element-plus/icons-vue'

function handleOpen(key, keyPath) {
    console.log(key, keyPath);
}
function handleClose(key, keyPath) {
    console.log(key, keyPath);
}

</script>

<style scoped>
/* 去掉选项右侧边框 */
.el-menu {
    border-right: none;
}

/* 设置整体布局高度 */
.container {
    height: 100vh;
}

.el-header,
.el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
}

.el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
}

.el-main {
    background-color: #E9EEF3;
    color: #333;
}

body>.el-container {
    margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
    line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
    line-height: 320px;
}
</style>